package com.example.consumer.receiver;

import com.example.consumer.config.HeaderConfig;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

@Component
public class HeaderMsgReceiver {

    @RabbitListener(queues = HeaderConfig.HEADER_QUEUE_NAME_NAME)
    public void nameMsgHandler(byte []msg){
        System.out.println("name header = "+new String(msg));
    }
    @RabbitListener(queues = HeaderConfig.HEADER_QUEUE_AGE_NAME)
    public void ageMsgHandler(byte []msg){
        System.out.println("age header = " + new String(msg));
    }


}
